// Generated with smithy-dart 0.3.2. DO NOT MODIFY.
// ignore_for_file: avoid_unused_constructor_parameters,deprecated_member_use_from_same_package,non_constant_identifier_names,unnecessary_library_name

// ignore_for_file: unused_element
library aws_json1_0_v1.json_rpc_10.test.no_input_and_output_operation_test_test; // ignore_for_file: no_leading_underscores_for_library_prefixes

import 'package:aws_json1_0_v1/src/json_rpc_10/model/no_input_and_output_output.dart';
import 'package:aws_json1_0_v1/src/json_rpc_10/operation/no_input_and_output_operation.dart';
import 'package:built_value/serializer.dart';
import 'package:smithy/smithy.dart' as _i3;
import 'package:smithy_test/smithy_test.dart' as _i2;
import 'package:test/test.dart' as _i1;

void main() {
  _i1.test('AwsJson10NoInputAndOutput (request)', () async {
    await _i2.httpRequestTest(
      operation: NoInputAndOutputOperation(
        region: 'us-east-1',
        baseUri: Uri.parse('https://example.com'),
      ),
      testCase: const _i2.HttpRequestTestCase(
        id: 'AwsJson10NoInputAndOutput',
        documentation:
            'A client should always send and empty JSON object payload.',
        protocol: _i3.ShapeId(namespace: 'aws.protocols', shape: 'awsJson1_0'),
        authScheme: null,
        body: '{}',
        bodyMediaType: 'application/json',
        params: {},
        vendorParamsShape: null,
        vendorParams: {},
        headers: {
          'Content-Type': 'application/x-amz-json-1.0',
          'X-Amz-Target': 'JsonRpc10.NoInputAndOutput',
        },
        forbidHeaders: [],
        requireHeaders: [],
        tags: [],
        appliesTo: null,
        method: 'POST',
        uri: '/',
        host: null,
        resolvedHost: null,
        queryParams: [],
        forbidQueryParams: [],
        requireQueryParams: [],
      ),
      inputSerializers: const [],
    );
  });
  _i1.test('AwsJson10NoInputAndOutput (response)', () async {
    await _i2.httpResponseTest(
      operation: NoInputAndOutputOperation(
        region: 'us-east-1',
        baseUri: Uri.parse('https://example.com'),
      ),
      testCase: const _i2.HttpResponseTestCase(
        id: 'AwsJson10NoInputAndOutput',
        documentation:
            'Empty output always serializes an empty object payload.',
        protocol: _i3.ShapeId(namespace: 'aws.protocols', shape: 'awsJson1_0'),
        authScheme: null,
        body: '{}',
        bodyMediaType: 'application/json',
        params: {},
        vendorParamsShape: null,
        vendorParams: {},
        headers: {'Content-Type': 'application/x-amz-json-1.0'},
        forbidHeaders: [],
        requireHeaders: [],
        tags: [],
        appliesTo: null,
        code: 200,
      ),
      outputSerializers: const [NoInputAndOutputOutputAwsJson10Serializer()],
    );
  });
}

class NoInputAndOutputOutputAwsJson10Serializer
    extends _i3.StructuredSmithySerializer<NoInputAndOutputOutput> {
  const NoInputAndOutputOutputAwsJson10Serializer()
    : super('NoInputAndOutputOutput');

  @override
  Iterable<Type> get types => const [NoInputAndOutputOutput];

  @override
  Iterable<_i3.ShapeId> get supportedProtocols => const [
    _i3.ShapeId(namespace: 'aws.protocols', shape: 'awsJson1_0'),
  ];

  @override
  NoInputAndOutputOutput deserialize(
    Serializers serializers,
    Iterable<Object?> serialized, {
    FullType specifiedType = FullType.unspecified,
  }) {
    return NoInputAndOutputOutputBuilder().build();
  }

  @override
  Iterable<Object?> serialize(
    Serializers serializers,
    NoInputAndOutputOutput object, {
    FullType specifiedType = FullType.unspecified,
  }) {
    throw StateError('Not supported for tests');
  }
}
